import axios from "axios"

axios.defaults.timeout = 5000;            //响应时间
axios.defaults.baseURL = 'https://www.vue-js.com/api/v1/';  //配置接口地址

//获取首页数据
export const getHome =(tab,page)=>{
	return axios.get("topics?tab="+tab+"&page="+page)
			
}
//获取详情页面
export const getDetail =(id)=>{
	return axios.get("topic/"+id)
			
}
//验证token
export const checkToken =(data)=>{
	return axios.post("accesstoken",data)
			
}
//发表评论
export const publishReply =(id,data)=>{
	return axios.post("topic/"+id+"/replies",data)
			
}